﻿Public Class ctrGrupoAcessoItem
    Inherits ControlePadrao.ctrPadrao

#Region "Variáveis"

    Private objGrupoAcessoItem As New Persistencia.perGrupoAcessoItens

#End Region

#Region "Métodos"

    Public Function inserirGrupoAcessoItem(ByVal iCodGrupo As Integer,
                                           ByVal iCodMenu As Integer,
                                           ByVal bInserir As Boolean,
                                           ByVal bExcluir As Boolean,
                                           ByVal bAlterar As Boolean,
                                           ByVal bConsultar As Boolean,
                                           ByVal bAbrirFecharConexao As Boolean) As Integer

        Try

            Return Me.objGrupoAcessoItem.inserirGrupoAcessoItem(iCodGrupo,
                                                                iCodMenu,
                                                                bInserir,
                                                                bExcluir,
                                                                bAlterar,
                                                                bConsultar,
                                                                bAbrirFecharConexao)

        Catch ex As Exception
            Throw New Exception(ex.Message)
        End Try

    End Function

    Public Function editarGrupoAcessoItem(ByVal iCodItem As Integer,
                                          ByVal bInserir As Boolean,
                                          ByVal bExcluir As Boolean,
                                          ByVal bAlterar As Boolean,
                                          ByVal bConsultar As Boolean,
                                          ByVal bAbrirFecharConexao As Boolean) As Int32
        Try

            Return Me.objGrupoAcessoItem.editarGrupoAcessoItem(iCodItem,
                                                               bInserir,
                                                               bExcluir,
                                                               bAlterar,
                                                               bConsultar,
                                                               bAbrirFecharConexao)

        Catch ex As Exception
            Throw New Exception(ex.Message)
        End Try

    End Function

    Public Sub excluirGrupoAcessoItem(ByVal iCodGrupoAcesso As Integer,
                                      ByVal bAbrirFecharConexao As Boolean)

        Try

            Me.objGrupoAcessoItem.excluirGrupoAcessoItem(iCodGrupoAcesso,
                                                         bAbrirFecharConexao)

        Catch ex As Exception
            Throw New Exception(ex.Message)
        End Try

    End Sub

#End Region

End Class
